Number
The class identifier Number is a synonym for Integer or Real; it describes a positive or negative number that can be either of class Integer or
of class Real.LITERAL EXPRESSIONS
1 2 -1 1000 10.2579432 1.0 1.Any valid literal expression for an Integer or a Real value is also a valid literal expression for a Number value.PROPERTY
Class
- The class identifier for the object. This property is read-only, and its value is always either
integer
orreal
.ELEMENTS
NoneOPERATORS
Because values identified as values of class Number are really values of either class Integer or class Real, the operators available are the operators described in the definitions of the Integer or Real value classes, beginning on page 46 and page 52, respectively.COERCIONS SUPPORTED
You can use the class identifier Number to coerce any value that can be coerced to a Real value or an Integer value. However, the resulting value class is always either Integer or Real:
set x to 1.5 as number class of x --result: real